package cn.fxyz.web.controller;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.fxyz.entity.Food;
import cn.fxyz.entity.Foodtype;
import cn.fxyz.service.FoodService;
import cn.fxyz.service.FoodtypeService;
@Controller
public class IndexController {
	@Resource
	private FoodtypeService foodtypeService;
	@Resource
	private FoodService foodService;
	@RequestMapping("index")
	public String index(Model model) {
		List<Foodtype> findAllType = foodtypeService.findAll();
		model.addAttribute("findAllType", findAllType);
		
		return "reception/home";
	}
	public FoodtypeService getFoodtypeService() {
		return foodtypeService;
	}
	public void setFoodtypeService(FoodtypeService foodtypeService) {
		this.foodtypeService = foodtypeService;
	}
	public FoodService getFoodService() {
		return foodService;
	}
	public void setFoodService(FoodService foodService) {
		this.foodService = foodService;
	}
	
	
}
